<template>
	<div>
		<el-table
			:data="showData"
			stripe
			style="width: 100%"
			row-key="id">
			<el-table-column
				prop="name"
				label="name"
				width="180" />
			<el-table-column
				prop="age"
				label="age"
				width="180" />
		</el-table>
		<el-pagination
			v-model:current-page="currentPage"
			layout="prev, pager, next"
			:total="totalLength"
			:default-page-size="pageSize"
			@current-change="handleSizeChange" />
	</div>
</template>

<script lang="ts" setup>
import {usePlainTable} from './usePlainTable.ts'

const { pageSize, currentPage, totalLength, showData, handleSizeChange } = usePlainTable();
</script>

<style lang="scss" scoped></style>
